
   <#include "head.ftl">
    <div class="container-wrap">
        <footer>
            <div class="row copyright"  style='background:linear-gradient(90deg, #FE2120, #AC0101);'>
                <div class="col-md-12 text-center">
                    <div class="panel-heading">
                    <#if item.option=='见义勇为'>
					<img src="${Domain.base}/public/images/item0.png" class='tag_css kd'/>
					</#if>
					<#if item.option=='诚实守信'>
					<img src="${Domain.base}/public/images/item1.png" class='tag_css kd'/>
					</#if>
					<#if item.option=='孝老爱亲'>
					<img src="${Domain.base}/public/images/item2.png" class='tag_css kd'/>
					</#if>
					<#if item.option=='敬业奉献'>
					<img src="${Domain.base}/public/images/item4.png" class='tag_css kd'/>
					</#if>
					 <#if item.option=='助人为乐'>
					<img src="${Domain.base}/public/images/item3.png" class='tag_css kd'/>
					</#if>
				</div>
                </div>
            </div>
        </footer>
    </div><!-- END container-wrap -->
    <div class="container-wrap item_big_box">
        <div id="fh5co-contact">
            <div class="row border_item">
                <div class="col-md-2 col-md-push-1 animate-box">
                 <h3> ${item.theme}</h3>
                 <img  class='item_img' src="${Domain.base}${item.img}" data-holder-rendered="true">
                 
                </div>
                <div class="col-md-9 col-md-push-1 animate-box">
                        <div class="row_content">
                                ${item.msg!}
                             <#if stop==1>
                                <div class='box_btn'>
                                  <input id="submit1" type="button" value="投 票" class="btn  btn-modify">
                            </div>
                            <#elseif stop==0>
                            <div class='box_btn'>
                                  <input id="submit2"  style='background:#bbb4b4' type="button" value="投票未开始" class="btn  btn-modify">
                            </div>
                            <#elseif stop==-1>
                            <div class='box_btn'>
                                  <input id="submit2"  style='background:#bbb4b4' type="button" value="投票已结束" class="btn  btn-modify">
                            </div>
                            </#if>
                             <div class="box_btn">
                               <input  type="button" value="分享拉票" id='lp' class="btn  btn-modify" onclick="WeiXinShareBtn()" />
                                  <a href="${Domain.base}/items"> <input  type="button" value="票数榜单" id='zps' class="btn  btn-modify" /></a>
                            </div>
                            
                             <div class=" box_btn">
                                     <a href="${Domain.base}/index"> <input id="submits" type="button" value="返回" class="btn  btn-modify"> </a>
                            </div>
                        </div>
                </div>
            </div>
        </div>
    </div><!-- END container-wrap -->
    <div class='container-wrap' style='margin-top:20px;width:98%;'>
    <img src='${Domain.base}/public/images/gz.png?t=1' style='width:100%;'/>
    </div>
    <img src='${Domain.base}/public/images/mc.png' style='width:100%;' class='mc'/>
   <#include "foot.ftl">
   <script>
       <#if stop==1>
   var size=0; 

$(document).ready(function(){



   var ism=$.cookie('ismtg_0') ;

   if(ism){
   	var arr = ism.split('-');
  	size=arr[arr.length-1];
  	 if(size<10)
  	 {
  		 if(size>0)
  	 		$('#submit1').val("已投票("+size+"/10)")
  	 	
  	 }else
  	 {
  	 	 $('#submit1').val("今天投票数已完成")
  
  	 }
   }
   
   
    $('#submit1').click(function () {
    if(size<10){
    	$.ajax({
            type:'post',
            url:'${Domain.base}/api/vote/${item.id}',
            data:{t:new Date().getTime()},
            dataType:'json',
            success:function (response) {
                if(response.status){
                  var ism=response.msg;
				   if(ism){
				   		var arr = ism.split('-')
				  		size=arr[arr.length-1];
				  		 if(size<10)
  	 					{
                			$('#submit1').val("已投票("+size+"/10)")
                		}else
                		{
                			$('#submit1').val("今天投票数已完成")
                		}
                	}
               
                }else {
                    alert(response.msg);
                    return false;
                }
            },
            error:function (response) {
                alert('发生未知错误，请稍后再尝试');
            }
        });
        }
    });
    });
    //分享到朋友圈
 </#if>   
    
    
function WeiXinShareBtn() {
if (typeof WeixinJSBridge == "undefined") {
alert("请通过微信打开链接进行分享 ");
}else {
$('.mc').show()}
}
$('.mc').click(function(){
$('.mc').hide()
})
    </script>
    
